package cn.jcet.mapreduce.sort;

import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Reducer;

import java.io.IOException;

/**
 * @author 鲜磊
 * @Date 2020/12/11 0:30
 */
public class FlowReduce extends Reducer<FlowBean,Text,Text,FlowBean> {

    @Override
    protected void reduce(FlowBean key, Iterable<Text> values, Context context) throws IOException, InterruptedException {
        // 直接写出，顺序对换
        for (Text value : values) {
            context.write(value,key);
        }
    }
}
